﻿using System;
using System.Collections.Generic;
using System.Text;
using ATSModel;
using ATSIDAL;
using System.Data;

namespace ATSBLL
{
    public class Report_PIMBatchData
    {
        private static readonly IPIMBatchReport dal = DALFactory.DataAccess.CreatePIMBatchReport();

        // 根据条码获取交调数据
        //public DataSet PIMData_ByProSN(string ProSN)
        //{
        //    return dal.PIMData_ByProSN(ProSN);
        //}
        public DataSet PIMData_ByProSN(string TableName, string ProSN)
        {
            return dal.PIMData_ByProSN(TableName, ProSN);
        }

        // 根据产品型号获取交调数据

        //public DataSet PIMData_ByProTypeID(string ProTypeID)
        //{
        //    return dal.PIMData_ByProTypeID(ProTypeID);
        //}
        public DataSet PIMData_ByProTypeID(string TableName, string ProTypeID)
        {
            return dal.PIMData_ByProTypeID(TableName, ProTypeID);
        }

        // 根据MO号获取交调数据
        //public DataSet PIMData_ByMO(string MOID)
        //{
        //    return dal.PIMData_ByMO(MOID);
        //} 
      

        public DataSet PIMData_ByMO(string TableName, string MOID)
        {
            return dal.PIMData_ByMO(TableName, MOID);
        }

        public DataSet PTData_ByMO(string TableName, string MOID, string sDt, string eDt)
        {
            return dal.PTData_ByMO(TableName,MOID, sDt, eDt);
        }

        public DataSet AllDate()
        {
            return dal.AllDate();
        }

        /// <summary>
        /// 根据时间段检索
        /// </summary>
        /// <param name="TableName"></param>
        /// <param name="dtS"></param>
        /// <param name="dtE"></param>
        /// <returns></returns>
        public DataSet PTData_ByDate(string TableName, string dtS, string dtE)
        {
            return dal.PTData_ByDate(TableName, dtS, dtE);
        }
        /// <summary>
        /// 根据测试员与时间段检索
        /// </summary>
        /// <param name="TableName"></param>
        /// <param name="User"></param>
        /// <param name="dtS"></param>
        /// <param name="dtE"></param>
        /// <returns></returns>
        public DataSet PTData_ByUserIDandDte(string TableName, string UserID, string dtS, string dtE)
        {
            return dal.PTData_ByUserIDandDte(TableName, UserID, dtS, dtE);
        } 
       
    }
}